<?php
// +----------------------------------------------------------------------
// | WoShiMaiJia Projcet 
// +----------------------------------------------------------------------
// | Copyright (c) 2010-2011 http://woshimaijia.com All rights reserved.
// +----------------------------------------------------------------------
// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )
// +----------------------------------------------------------------------
// | Author: xinqiyang <xinqiyang@gmail.com>
// +----------------------------------------------------------------------

class ItemAction extends AppBaseAction
{
	
	public function item()
	{
		//get the validate and return the result
		if(isset($_GET['id']) && intval($_GET['id'])>0){
			//@TODO:need to change here
			$r = ItemLogic::getObject($_GET);
			$r['object'] = empty($r['object']) ? 'product' : $r['object'];
			//var_dump($r);
			$data['data'] = $r;
			if(isset($r['object'])){
				$this->t(array('data'=>$data),'Item/'.$r['object']);
			}
		}
	}
}